package cn.demoncat.util.lang.entity.report;

import java.util.Objects;

/**
 * ID统计
 * 
 * @author 延晓磊
 *
 * @since 2018年7月24日
 */
public class IdCountSum extends CountSum {

	// ID
	protected Long id;

	public IdCountSum() {
		super();
	}

	public IdCountSum(Long id, long count, String sum) {
		super(count,sum);
		this.id = id;
	}

	public IdCountSum(Long id, long count) {
		super(count);
		this.id = id;
	}

	public IdCountSum(Long id, String sum) {
		super(sum);
		this.id = id;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		if (!super.equals(o)) return false;
		IdCountSum idCount = (IdCountSum) o;
		return Objects.equals(id, idCount.id);
	}

	@Override
	public int hashCode() {
		return Objects.hash(super.hashCode(), id);
	}

	@Override
	public String toString() {
		return "IdCountSum{" +
				"id=" + id +
				", count=" + count +
				", sum='" + sum + '\'' +
				'}';
	}
}
